# Take a path containing images, and a path containing ROIs (from ImageJ), and output cropped images
# based on ROIs.

import img_util.imgproc

# Define paths
my_db_basepath = "C:/Users/timhc/Dropbox/"
my_img_basepath = "C:/Tim's Data/"

img_path = my_img_basepath + "IHC folder/"
roi_path = my_db_basepath + "Work/crop ROI/"
img_save_basepath = my_db_basepath + "Work/crop img/"

img_crop_suffix = ["DMS", "DLS"]  # ["rDMS", "rDLS", "lDMS", "lDLS"]
file_in_ext = ".png"  # Input image file extension (e.g., ".tif")
file_out_ext = ".png"  # Output image file extension (e.g., ".png")

img_util.imgproc.batch_roi_crop_img(img_path, roi_path, img_save_basepath, img_crop_suffix, file_in_ext, file_out_ext, "_")
